#!/bin/bash

#/ Usage: script/clean
#/ Clean all node_modules and pnpm-lock files recursively.

echo "Deleting all node_modules and pnpm-lock.yaml files recursively 🗑"
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + -print
find . -name ".next" -type d -prune -exec rm -rf '{}' + -print
find . -name ".turbo" -type d -prune -exec rm -rf '{}' + -print
find . -name ".wrangler" -type d -prune -exec rm -rf '{}' + -print
find . -name "pnpm-lock.yaml" -type f -prune -exec rm -rf '{}' + -print
find . -name "tsconfig.tsbuildinfo" -type f -prune -exec rm -rf '{}' + -print
echo "node_modules and lock files deleted 🎉"
